const http = uni.$u.http

/* 用户登录 */
export const wxLogin = (params, config = {}) => http.post('/api/wx/byOpenId', params, config)

/* 获取用户信息 */
export const getUserUserIdAndToken = (params, config = {}) => http.post('/api/wx/wxLogin', params, config)

/* 获取用户信息详情 */
// export const getUserDetail = (params) => http.get('/apiWechat/loveUser/detail', {
// 	params: params
// })
export const getUserDetail = (params) => http.post('/apiWechat/loveUser/detail',  params)

/* 获取好  详情 */
export const getFriendDetail = (params, config = {}) => http.post('/apiWechat/loveUserApi/query', params, config)


/* 发送验证码 */
export const sendPhoneCode = (params, config = {}) => http.post('/api/sms/smsMsg', params, config)

/* 验证码验证 */
export const validatePhoneCode = (params, config = {}) => http.post('/api/sms/validateSmsMsg', params, config)

/* 上传图片 */
export const uploadFile = (params, filePath, name, formData) => http.upload('/sysFileInfo/upload', {
	params: params,
	filePath: filePath,
	name: name,
	formData: formData
})

/* 推荐列表 */
export const suggestList = (params, config = {}) => http.post('/apiWechat/loveUser/suggestList', params, config)
/* 用户注册 */
export const userRegister = (params, config = {}) => http.post('/apiWechat/register', params, config)

/* 更新用户信息 */
export const updateUserInfo = (params, config = {}) => http.post('/apiWechat/loveUserApi/update', params, config)


/* 获取机构列表 */
export const mechanismList = (params) => http.get('/apiWechat/sysOrg/tree', params)

/* 获取喜欢列表 */
export const LikingList = (params) => http.get('/apiWechat/loveUserApi/recordsList', {
	params: params
})



/* 获取标签列表 */
export const getTagsList = (params) => http.get('/apiWechat/loveLabelType/tree', params)

/* 标记喜欢 */
export const markLikesUser = (params, config = {}) => http.post('/apiWechat/loveUserApi/records', params, config)

/* 获取字典 */
export const sysDict = (params) => http.get('/apiWechat/sysDictType/dropDown', {
	params: params
})

/* 注销 */
export const logout = (params, config = {}) => http.post('/apiWechat/logout', params, config)

/* 获取字典 */
export const sysNotice = (params) => http.get('/api/sysNotice/page', {
	params: params
})
